package com.javaweb.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

/**
 * @desc:
 * @author: Ping
 * @date: 2024/9/17 21:12
 */

@Data
@Setter
@Getter
@EqualsAndHashCode
@Accessors(chain = true) // 链式编程
/**
 *  User user = new User().setName("zhangsan")
 *                       .setPassword("")
 *                       .setGender(0) ;
 */
public class User {
    @ExcelProperty("用户ID")
    private int userId ;
    @NotBlank
    @ExcelProperty("用户名")
    private String name ;
    @NotBlank
    @ExcelProperty("密码")
    private String password ;
    @ExcelIgnore
    private int age ;
    @ExcelProperty("性别")
    private int gender ;
    @ExcelProperty("盐")
    private String salt ;
    @ExcelProperty("创建时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date createTime ;
    @ExcelIgnore
    private List<Role> roles ;
    private Integer score ;
    private Integer status ;
    @ExcelProperty("邮件")
    private String email ;





}
